﻿
using System.Collections;
using System.Collections.Generic;

using Dict.DataModel;
namespace Dict.Blo
{
    public class DictPetBlo
    {
        public static TablePet GetTablePet(string petId) {
            return Dict.DictDataManager.Instance.tablePetDao.GetById(petId);
        }
        //item id
        public static List<string> GetPetLoveAndUnLoveItem(int nature,out List<string> unlove)
        {
            List<string> loveItem = new List<string>();
            unlove = new List<string>();
            foreach (TableItem item in DictDataManager.Instance.tableItemDao.CacheList)
            {
                if (item.nature == 0)
                    continue;
                else if (item.nature == nature)
                {
                    //if(StaticData.playerData.HasItem(item.itemId))
                        loveItem.Add(item.itemId);
                }
                else
                {
                   // if (StaticData.playerData.HasItem(item.itemId))
                        unlove.Add(item.itemId);
                }
            }
            return loveItem;
        }
        public static string GetPetNature(int nature)
        {
            string natureStr = "";
            if (nature == 1)
            {
                natureStr = "fire";
            }else if(nature ==2)
            {
                natureStr = "wind";
            }else if (nature == 3)
            {
                natureStr = "water";
            }else if (nature ==4)
            {
                natureStr = "light";
            }else if(nature ==5)
            {
                natureStr = "dark";
            }
            return natureStr;
        }
    }

}